import request from '@/utils/request'

// 查询实验样品列表(所有)
export function listSampleAll(query) {
  return request({
    url: '/sample/sample/listAll',
    method: 'get',
    params: query
  })
}

// 查询实验样品列表
export function listSample(query) {
  return request({
    url: '/sample/sample/list',
    method: 'get',
    params: query
  })
}

// 查询实验样品详细
export function getSample(id) {
  return request({
    url: '/sample/sample/' + id,
    method: 'get'
  })
}

// 新增实验样品
export function addSample(data) {
  return request({
    url: '/sample/sample',
    method: 'post',
    data: data
  })
}

// 修改实验样品
export function updateSample(data) {
  return request({
    url: '/sample/sample',
    method: 'put',
    data: data
  })
}

// 删除实验样品
export function delSample(id) {
  return request({
    url: '/sample/sample/' + id,
    method: 'delete'
  })
}
// 删除实验样品
export function logicDelSample(id) {
  return request({
    url: '/sample/sample/' + id,
    method: 'delete'
  })
}

// 导出实验样品
export function exportSample(query) {
  return request({
    url: '/sample/sample/export',
    method: 'get',
    params: query
  })
}
// 领样记录
export function getSampleRecord(query) {
  return request({
    url: '/sampleRecord/sampleRecord/list',
    method: 'get',
    params: query
  })
}
// 领样记录单条
export function getSampleRecorddantiao(id) {
  return request({
    url: '/sampleRecord/sampleRecord/' + id,
    method: 'get',
  })
}

// 数据录入修改
export function updateSampleRecord(data) {
  return request({
    url: '/client/attachedRecord',
    method: 'put',
    data: data
  })
}
// 领样修改
export function updateSampleRecord2(data) {
  return request({
    url: '/sampleRecord/sampleRecord',
    method: 'put',
    data: data
  })
}

// 数据录入列表
export function getAttachedRecord(query) {
  return request({
    url: '/attachedRecord/attachedRecord/list',
    method: 'get',
    params: query
  })
}
// 数据记录
export function getAttachedRecord1(id) {
  return request({
    url: '/client/attachedRecord/' + id,
    method: 'get',
  })
}